<?php
require_once(__PHY_LIB.'/func/_Common.func.php');
require_once(__PHY_LIB.'/class/Session.class.php'); new Session();
require_once(__PHY_LIB.'/class/uUser.class.php');
require_once(__PHY_LIB.'/class/Tpl.class.php');

$oTpl = new MktTpl();
$oTpl->assignConst();
$_The = array();
$oTpl->assign_by_ref('_The', $_The);

/// 判断登录 ///
$rCookie = validate($_COOKIE, 'u_type:e[empty,guest,user]|u_id:n|u_nick:u');
if ('user' == $rCookie['u_type']) {
	$oOne = new uUser($rCookie['u_id']);
	$_The['UserType'] = 'user';
	$_The['User'] = $oOne->getData();
}
else {
	;
}

/// 路径位置 ///
$_The['Nav'] = explode('/', $_SERVER['SCRIPT_NAME']);
$_The['ScriptBase'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '.'));

header("Content-type: text/html; charset=utf-8");
?>
